package xyz.zhouzhaodong.crm.service;

import org.springframework.web.multipart.MultipartFile;
import xyz.zhouzhaodong.crm.entity.Material;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 材料表 服务类
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-13
 */
public interface IMaterialService extends IService<Material> {

    /**
     * 上传单文件
     * @param file
     * @param staffId
     * @param customerId
     * @return
     */
    RestMessage uploadOneFile(MultipartFile file, String staffId, String customerId);

    /**
     * 上传多文件
     * @param files
     * @param staffId
     * @param customerId
     * @return
     */
    RestMessage uploadManyFile(MultipartFile[] files, String staffId, String customerId);

    /**
     * 文件下载
     * @param response
     * @param fileUrl
     * @return
     */
    RestMessage fileDowLoad(HttpServletResponse response, String fileUrl);

    /**
     * 根据客户id获取文件列表
     * @param clientId
     * @return
     */
    RestMessage findFiles(String clientId);

}
